import request from '@/utils/request'

// 查询货主列表
export function listClient(query) {
  return request({
    url: '/tms/client/list',
    method: 'get',
    params: query
  })
}

// 初始化
export function initBean() {
    return request({
        url: '/tms/client/initBean',
        method: 'post'
    })
}

// 查询货主详细
export function getClient(id) {
  return request({
    url: '/tms/client/' + id,
    method: 'get'
  })
}

// 新增货主
export function addClient(data) {
  return request({
    url: '/tms/client',
    method: 'post',
    data: data
  })
}

// 修改货主
export function updateClient(data) {
  return request({
    url: '/tms/client',
    method: 'put',
    data: data
  })
}

// 删除货主
export function delClient(id) {
  return request({
    url: '/tms/client/' + id,
    method: 'delete'
  })
}
